<script setup lang="ts">
import bgVideo from '@/assets/image/bg.mp4'
import { onMounted, onUnmounted, ref } from 'vue'

const emit = defineEmits<{
  back: []
}>()

const isLandscape = ref(false)
const videoRef = ref<HTMLVideoElement | null>(null)
let mediaQuery: MediaQueryList | null = null
let mediaQueryHandler: ((e: MediaQueryListEvent) => void) | null = null
let mediaQueryHandlerLegacy: ((e: MediaQueryList) => void) | null = null

const handleVideoLoaded = () => {
  // 确保视频播放
  if (videoRef.value) {
    videoRef.value.play().catch(() => {
      // 如果自动播放失败，静默处理（某些浏览器需要用户交互）
    })
  }
}

const checkOrientation = () => {
  // 检测屏幕方向 - 使用多种方法确保准确性
  const width = window.innerWidth || document.documentElement.clientWidth
  const height = window.innerHeight || document.documentElement.clientHeight
  
  // 方法1: 通过宽高比判断
  const isWide = width > height
  
  // 方法2: 通过 orientation API 判断（如果支持）
  let isOrientationLandscape = false
  if (screen.orientation) {
    const angle = screen.orientation.angle
    isOrientationLandscape = angle === 90 || angle === -90 || angle === 270
  } else if (window.orientation !== undefined) {
    // 兼容旧版浏览器
    const angle = window.orientation as number
    isOrientationLandscape = Math.abs(angle) === 90
  }
  
  // 综合判断
  isLandscape.value = isWide || isOrientationLandscape
}

const handleOrientationChange = () => {
  // orientationchange 事件触发时，需要延迟一下等待尺寸更新
  setTimeout(() => {
    checkOrientation()
  }, 100)
}

const handleBack = () => {
  emit('back')
}

const handleGuideClick = () => {
  // 景点导览点击事件
  console.log('进入景点导览')
}

const handleGameClick = () => {
  // 打卡游戏点击事件
  console.log('进入打卡游戏')
}

onMounted(() => {
  // 初始检测
  checkOrientation()
  
  // 监听窗口大小变化
  window.addEventListener('resize', checkOrientation)
  
  // 监听屏幕方向变化（需要延迟处理）
  window.addEventListener('orientationchange', handleOrientationChange)
  
  // 监听屏幕方向变化（使用 MediaQueryList，更可靠）
  if (window.matchMedia) {
    mediaQuery = window.matchMedia('(orientation: landscape)')
    
    // 初始检查
    isLandscape.value = mediaQuery.matches
    
    // 监听变化（现代浏览器）
    if (mediaQuery.addEventListener) {
      mediaQueryHandler = (e: MediaQueryListEvent) => {
        isLandscape.value = e.matches
      }
      mediaQuery.addEventListener('change', mediaQueryHandler)
    } else if (mediaQuery.addListener) {
      // 兼容旧版浏览器
      mediaQueryHandlerLegacy = (e: MediaQueryList) => {
        isLandscape.value = e.matches
      }
      // @ts-ignore - 旧版浏览器 API 类型定义不同
      mediaQuery.addListener(mediaQueryHandlerLegacy)
    }
  }
})

onUnmounted(() => {
  window.removeEventListener('resize', checkOrientation)
  window.removeEventListener('orientationchange', handleOrientationChange)
  
  // 清理 MediaQueryList 监听器
  if (mediaQuery) {
    if (mediaQuery.removeEventListener && mediaQueryHandler) {
      mediaQuery.removeEventListener('change', mediaQueryHandler)
    } else if (mediaQuery.removeListener && mediaQueryHandlerLegacy) {
      // @ts-ignore - 旧版浏览器 API 类型定义不同
      mediaQuery.removeListener(mediaQueryHandlerLegacy)
    }
  }
  mediaQuery = null
  mediaQueryHandler = null
  mediaQueryHandlerLegacy = null
})
</script>

<template>
  <div class="landscape-page">
    <!-- 背景视频 -->
    <video
      ref="videoRef"
      class="landscape-page__bg-video"
      :src="bgVideo"
      autoplay
      loop
      muted
      playsinline
      preload="auto"
      @loadeddata="handleVideoLoaded"
    />
    
    <!-- 遮罩层 -->
    <div class="landscape-page__overlay" />
    
    <!-- 内容区域 -->
    <div class="landscape-page__content">
      <button class="landscape-page__back-btn" @click="handleBack" title="返回首页">
        <span>←</span>
        <span>返回</span>
      </button>
      
      <!-- 标题区域 -->
      <header class="landscape-page__header">
        <div class="header-decoration header-decoration--left"></div>
        <div class="header-content">
          <h1 class="landscape-page__title">
            <span class="title-main">黄山</span>
            <span class="title-sub">HUANGSHAN</span>
          </h1>
          <p class="landscape-page__subtitle">奇松·怪石·云海·温泉</p>
        </div>
        <div class="header-decoration header-decoration--right"></div>
      </header>
      
      <!-- 主要内容区域 -->
      <main class="landscape-page__main">
        <div class="main-cards">
          <!-- 景点导览卡片 -->
          <div class="feature-card feature-card--guide" @click="handleGuideClick">
            <div class="card-decoration card-decoration--top"></div>
            <div class="feature-card__shimmer"></div>
            <div class="card-content">
              <div class="card-icon">
                <svg viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
                  <path d="M32 8L40 24L56 28L44 40L46 56L32 48L18 56L20 40L8 28L24 24L32 8Z" 
                        stroke="currentColor" stroke-width="2" fill="none"/>
                  <circle cx="32" cy="32" r="8" stroke="currentColor" stroke-width="2" fill="none"/>
                </svg>
              </div>
              <h2 class="card-title">景点导览</h2>
              <p class="card-desc">探索黄山奇景<br/>领略自然之美</p>
              <div class="card-footer">
                <span class="card-action">进入导览 →</span>
              </div>
            </div>
            <div class="card-decoration card-decoration--bottom"></div>
            <div class="card-glow card-glow--guide"></div>
          </div>
          
          <!-- 打卡游戏卡片 -->
          <div class="feature-card feature-card--game" @click="handleGameClick">
            <div class="card-decoration card-decoration--top"></div>
            <div class="feature-card__shimmer"></div>
            <div class="card-content">
              <div class="card-icon">
                <svg viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
                  <rect x="12" y="12" width="40" height="40" rx="4" 
                        stroke="currentColor" stroke-width="2" fill="none"/>
                  <path d="M20 32L28 40L44 24" stroke="currentColor" stroke-width="3" 
                        stroke-linecap="round" stroke-linejoin="round"/>
                  <circle cx="48" cy="16" r="4" fill="currentColor"/>
                </svg>
              </div>
              <h2 class="card-title">打卡游戏</h2>
              <p class="card-desc">完成打卡任务<br/>收集专属徽章</p>
              <div class="card-footer">
                <span class="card-action">开始游戏 →</span>
              </div>
            </div>
            <div class="card-decoration card-decoration--bottom"></div>
            <div class="card-glow card-glow--game"></div>
          </div>
        </div>
      </main>
      
      <!-- 底部装饰 -->
      <footer class="landscape-page__footer">
        <div class="footer-decoration"></div>
        <p class="footer-text">黄山风景区 · 世界文化与自然双重遗产</p>
      </footer>
    </div>
    
    <!-- 竖屏提示 -->
    <div v-if="!isLandscape" class="landscape-page__orientation-tip">
      <div class="orientation-tip__icon">📱</div>
      <p>请将设备横屏查看</p>
    </div>
  </div>
</template>

<style scoped>
.landscape-page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.landscape-page__bg-video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  object-fit: cover;
  z-index: 0;
}

.landscape-page__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 240, 220, 0.15) 0%,
    rgba(255, 230, 200, 0.2) 15%,
    rgba(255, 220, 180, 0.25) 30%,
    rgba(250, 210, 170, 0.3) 50%,
    rgba(240, 200, 160, 0.25) 70%,
    rgba(230, 190, 150, 0.2) 85%,
    rgba(220, 180, 140, 0.15) 100%
  );
  z-index: 1;
}

.landscape-page__overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at 60% 30%,
    rgba(255, 220, 180, 0.25) 0%,
    rgba(255, 200, 160, 0.2) 20%,
    rgba(250, 190, 150, 0.15) 40%,
    rgba(240, 180, 140, 0.1) 60%,
    transparent 80%
  );
  z-index: 1;
  animation: glowPulse 8s ease-in-out infinite;
}

.landscape-page__overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 25% 35%, rgba(255, 230, 200, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 75% 65%, rgba(255, 210, 180, 0.1) 0%, transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(250, 200, 170, 0.08) 0%, transparent 50%);
  z-index: 1;
  pointer-events: none;
  animation: cloudFloat 12s ease-in-out infinite;
}

.landscape-page__content {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 40px 60px;
  color: #f2f5ff;
}

.landscape-page__back-btn {
  position: absolute;
  top: 24px;
  left: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 12px;
  border: 2px solid rgba(255, 220, 180, 0.4);
  background: linear-gradient(
    135deg,
    rgba(255, 245, 235, 0.3) 0%,
    rgba(255, 240, 225, 0.35) 100%
  );
  color: #ffd9b3;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.4s ease;
  backdrop-filter: blur(16px) saturate(1.2);
  z-index: 3;
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.3),
    0 2px 10px rgba(255, 220, 180, 0.25),
    inset 0 1px 2px rgba(255, 255, 255, 0.4),
    inset 0 -1px 2px rgba(0, 0, 0, 0.15);
}

.landscape-page__back-btn:hover {
  background: linear-gradient(
    135deg,
    rgba(255, 240, 225, 0.4) 0%,
    rgba(255, 235, 215, 0.45) 100%
  );
  border-color: rgba(255, 230, 200, 0.6);
  transform: translateX(-2px);
  box-shadow: 
    0 6px 24px rgba(0, 0, 0, 0.4),
    0 4px 14px rgba(255, 220, 180, 0.35),
    inset 0 1px 3px rgba(255, 255, 255, 0.5),
    inset 0 -1px 3px rgba(0, 0, 0, 0.2);
}

.landscape-page__back-btn:active {
  transform: translateX(0);
}

.landscape-page__back-btn span:first-child {
  font-size: 18px;
}

.landscape-page__header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  width: 100%;
  padding: 20px 0;
  animation: fadeInDown 0.8s ease-out;
  position: relative;
}

.header-decoration {
  flex: 1;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 230, 200, 0.5),
    rgba(255, 220, 180, 0.8),
    rgba(255, 210, 170, 0.95),
    rgba(255, 220, 180, 0.8),
    rgba(255, 230, 200, 0.5),
    transparent
  );
  position: relative;
  box-shadow: 
    0 2px 10px rgba(255, 220, 180, 0.4),
    0 0 20px rgba(255, 210, 170, 0.3);
}

.header-decoration::before,
.header-decoration::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 220, 180, 0.95);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 240, 220, 0.3) 0%,
    rgba(255, 230, 200, 0.2) 50%,
    rgba(255, 220, 180, 0.1) 100%
  );
  box-shadow: 
    0 0 12px rgba(255, 220, 180, 0.6),
    0 0 24px rgba(255, 210, 170, 0.4),
    inset 0 1px 3px rgba(255, 255, 255, 0.3);
}

.header-decoration--left::before {
  left: -4px;
}

.header-decoration--right::after {
  right: -4px;
}

.header-content {
  text-align: center;
  min-width: 300px;
}

.landscape-page__title {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.title-main {
  font-size: clamp(48px, 7vw, 72px);
  font-weight: 700;
  background: linear-gradient(
    135deg,
    #fff5e6 0%,
    #ffe8cc 15%,
    #ffd9b3 30%,
    #ffcc99 50%,
    #ffd9b3 70%,
    #ffe8cc 85%,
    #fff5e6 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 
    0 0 40px rgba(255, 245, 230, 0.9),
    0 0 60px rgba(255, 232, 204, 0.6),
    0 0 80px rgba(255, 217, 179, 0.4),
    0 4px 16px rgba(0, 0, 0, 0.5),
    2px 2px 8px rgba(0, 0, 0, 0.3);
  letter-spacing: 0.1em;
  font-family: 'Noto Sans SC', 'Microsoft YaHei', 'SimHei', serif;
  position: relative;
  animation: float 6s ease-in-out infinite;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.2));
}

.title-main::before {
  content: '黄山';
  position: absolute;
  top: 4px;
  left: 4px;
  background: linear-gradient(
    135deg,
    rgba(255, 200, 150, 0.5),
    rgba(255, 180, 130, 0.4),
    rgba(255, 160, 110, 0.3)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  z-index: -1;
  filter: blur(3px);
  opacity: 0.6;
}

.title-sub {
  font-size: clamp(14px, 2vw, 18px);
  color: rgba(255, 240, 220, 0.9);
  letter-spacing: 0.3em;
  font-weight: 300;
  text-transform: uppercase;
  text-shadow: 
    0 2px 6px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(255, 240, 220, 0.3);
}

.landscape-page__subtitle {
  margin: 12px 0 0;
  font-size: clamp(14px, 1.8vw, 18px);
  color: rgba(255, 235, 210, 0.95);
  letter-spacing: 0.2em;
  font-weight: 400;
  text-shadow: 
    0 2px 6px rgba(0, 0, 0, 0.4),
    0 0 15px rgba(255, 235, 210, 0.25);
}

.landscape-page__main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0 40px;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.main-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  width: 100%;
  max-width: 900px;
}

.feature-card {
  position: relative;
  padding: 40px 32px;
  border-radius: 24px;
  background: linear-gradient(
    135deg,
    rgba(40, 30, 20, 0.65) 0%,
    rgba(45, 35, 25, 0.7) 25%,
    rgba(50, 40, 30, 0.75) 50%,
    rgba(45, 35, 25, 0.7) 75%,
    rgba(40, 30, 20, 0.65) 100%
  );
  border: 2px solid rgba(255, 220, 180, 0.5);
  box-shadow: 
    0 16px 48px rgba(0, 0, 0, 0.5),
    0 8px 24px rgba(255, 220, 180, 0.3),
    0 4px 12px rgba(255, 210, 170, 0.25),
    inset 0 2px 6px rgba(255, 255, 255, 0.15),
    inset 0 -2px 6px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 230, 200, 0.2);
  backdrop-filter: blur(20px) saturate(1.3);
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.feature-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 245, 235, 0.15) 0%,
    rgba(255, 240, 225, 0.2) 50%,
    rgba(255, 245, 235, 0.15) 100%
  );
  z-index: 0;
  pointer-events: none;
}

.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(
      135deg,
      rgba(255, 240, 220, 0.2) 0%,
      rgba(255, 230, 200, 0.18) 30%,
      transparent 50%,
      rgba(255, 220, 180, 0.15) 70%,
      transparent 100%
    ),
    radial-gradient(
      circle at 30% 30%,
      rgba(255, 235, 210, 0.25) 0%,
      rgba(255, 225, 195, 0.2) 30%,
      transparent 60%
    ),
    radial-gradient(
      circle at 70% 70%,
      rgba(255, 220, 180, 0.2) 0%,
      transparent 50%
    );
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 1;
}

.feature-card__shimmer {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 250, 240, 0.25),
    rgba(255, 245, 230, 0.35),
    rgba(255, 250, 240, 0.25),
    transparent
  );
  transition: left 1s ease;
  z-index: 2;
  pointer-events: none;
}

.feature-card:hover .feature-card__shimmer {
  left: 100%;
}

.feature-card:hover {
  transform: translateY(-12px) scale(1.04);
  border-color: rgba(255, 230, 200, 0.7);
  box-shadow: 
    0 24px 72px rgba(0, 0, 0, 0.5),
    0 12px 32px rgba(255, 220, 180, 0.4),
    0 6px 16px rgba(255, 210, 170, 0.3),
    inset 0 3px 8px rgba(255, 255, 255, 0.4),
    inset 0 -3px 8px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(255, 240, 220, 0.3),
    0 0 80px rgba(255, 220, 180, 0.4),
    0 0 120px rgba(255, 210, 170, 0.2);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card--guide {
  border-color: rgba(255, 225, 195, 0.5);
}

.feature-card--guide:hover {
  border-color: rgba(255, 235, 210, 0.8);
}

.feature-card--game {
  border-color: rgba(255, 230, 200, 0.5);
}

.feature-card--game:hover {
  border-color: rgba(255, 240, 220, 0.8);
}

.card-decoration {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 230, 200, 0.6),
    rgba(255, 220, 180, 0.9),
    rgba(255, 210, 170, 1),
    rgba(255, 220, 180, 0.9),
    rgba(255, 230, 200, 0.6),
    transparent
  );
  box-shadow: 
    0 2px 10px rgba(255, 220, 180, 0.5),
    0 0 20px rgba(255, 210, 170, 0.4);
  z-index: 3;
}

.card-decoration--top {
  top: 16px;
}

.card-decoration--bottom {
  bottom: 16px;
}

.card-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}

.card-content::before {
  content: '';
  position: absolute;
  inset: -20px;
  background: 
    radial-gradient(circle at 20% 30%, rgba(255, 220, 160, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(240, 200, 140, 0.05) 0%, transparent 40%);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.feature-card:hover .card-content::before {
  opacity: 1;
}

.card-icon {
  width: 64px;
  height: 64px;
  color: #ffd9b3;
  opacity: 0.95;
  transition: all 0.5s ease;
  filter: 
    drop-shadow(0 4px 10px rgba(255, 217, 179, 0.5))
    drop-shadow(0 0 16px rgba(255, 232, 204, 0.4))
    drop-shadow(0 0 24px rgba(255, 220, 180, 0.3));
}

.feature-card:hover .card-icon {
  transform: scale(1.18) rotate(5deg);
  opacity: 1;
  color: #ffe8cc;
  filter: 
    drop-shadow(0 8px 20px rgba(255, 232, 204, 0.7))
    drop-shadow(0 0 30px rgba(255, 220, 180, 0.6))
    drop-shadow(0 0 40px rgba(255, 210, 170, 0.4));
}

.card-title {
  margin: 0;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 600;
  background: linear-gradient(
    135deg,
    #fff5e6 0%,
    #ffe8cc 25%,
    #ffd9b3 50%,
    #ffe8cc 75%,
    #fff5e6 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 
    0 3px 10px rgba(0, 0, 0, 0.7),
    0 1px 3px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(255, 245, 230, 0.5),
    0 0 30px rgba(255, 232, 204, 0.4);
  letter-spacing: 0.1em;
  font-family: 'Noto Sans SC', 'Microsoft YaHei', 'SimHei', serif;
  position: relative;
  filter: 
    drop-shadow(0 4px 8px rgba(255, 245, 230, 0.6))
    drop-shadow(0 0 20px rgba(255, 232, 204, 0.5));
}

.card-desc {
  margin: 0;
  font-size: clamp(14px, 1.6vw, 18px);
  color: #fff5e6;
  line-height: 1.8;
  letter-spacing: 0.05em;
  text-shadow: 
    0 3px 8px rgba(0, 0, 0, 0.7),
    0 1px 3px rgba(0, 0, 0, 0.5),
    0 0 15px rgba(255, 240, 220, 0.4),
    0 0 25px rgba(255, 232, 204, 0.3);
  font-weight: 400;
}

.card-footer {
  margin-top: 8px;
}

.card-action {
  font-size: clamp(13px, 1.4vw, 16px);
  color: #ffe8cc;
  font-weight: 500;
  letter-spacing: 0.1em;
  transition: all 0.4s ease;
  display: inline-block;
  text-shadow: 
    0 3px 8px rgba(0, 0, 0, 0.7),
    0 1px 3px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(255, 232, 204, 0.5),
    0 0 30px rgba(255, 217, 179, 0.4);
}

.feature-card:hover .card-action {
  color: #fff5e6;
  transform: translateX(4px);
  text-shadow: 
    0 4px 10px rgba(0, 0, 0, 0.8),
    0 2px 5px rgba(0, 0, 0, 0.6),
    0 0 25px rgba(255, 232, 204, 0.6),
    0 0 35px rgba(255, 220, 180, 0.5),
    0 0 45px rgba(255, 210, 170, 0.3);
}

.card-glow {
  position: absolute;
  inset: -50%;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
}

.card-glow--guide {
  background: radial-gradient(
    circle,
    rgba(255, 235, 210, 0.5) 0%,
    rgba(255, 225, 195, 0.4) 30%,
    rgba(255, 220, 180, 0.3) 50%,
    transparent 70%
  );
}

.card-glow--game {
  background: radial-gradient(
    circle,
    rgba(255, 240, 220, 0.5) 0%,
    rgba(255, 230, 200, 0.4) 30%,
    rgba(255, 220, 180, 0.3) 50%,
    transparent 70%
  );
}

.feature-card:hover .card-glow {
  opacity: 1;
}

.landscape-page__footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 20px 0;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.footer-decoration {
  width: 200px;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 230, 200, 0.6),
    rgba(255, 220, 180, 0.9),
    rgba(255, 210, 170, 1),
    rgba(255, 220, 180, 0.9),
    rgba(255, 230, 200, 0.6),
    transparent
  );
  box-shadow: 
    0 2px 10px rgba(255, 220, 180, 0.5),
    0 0 20px rgba(255, 210, 170, 0.4);
}

.footer-text {
  margin: 0;
  font-size: clamp(12px, 1.4vw, 15px);
  color: rgba(255, 240, 220, 0.9);
  letter-spacing: 0.15em;
  font-weight: 300;
  text-shadow: 
    0 2px 5px rgba(0, 0, 0, 0.4),
    0 0 15px rgba(255, 240, 220, 0.25);
}

.landscape-page__orientation-tip {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 11, 39, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  z-index: 10;
  color: #f2f5ff;
}

.orientation-tip__icon {
  font-size: 64px;
  animation: rotate 2s ease-in-out infinite;
}

.landscape-page__orientation-tip p {
  margin: 0;
  font-size: 18px;
  color: rgba(205, 220, 255, 0.9);
  letter-spacing: 0.1em;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes glowPulse {
  0% {
    transform: scale(0.85);
    opacity: 0.35;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.75;
  }
  100% {
    transform: scale(0.85);
    opacity: 0.35;
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes rotate {
  0%,
  100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-90deg);
  }
  75% {
    transform: rotate(90deg);
  }
}

@keyframes cloudFloat {
  0%, 100% {
    transform: translate(0, 0);
    opacity: 1;
  }
  50% {
    transform: translate(10px, -5px);
    opacity: 0.9;
  }
}

/* 横屏优化 */
@media (orientation: landscape) and (max-height: 600px) {
  .landscape-page__content {
    padding: 20px 30px;
  }

  .landscape-page__header {
    padding: 15px 0;
    gap: 16px;
  }

  .title-main {
    font-size: clamp(36px, 5vw, 56px);
  }

  .title-sub {
    font-size: clamp(12px, 1.5vw, 16px);
  }

  .landscape-page__subtitle {
    font-size: clamp(12px, 1.5vw, 16px);
    margin-top: 8px;
  }

  .landscape-page__main {
    padding: 0 20px;
  }

  .main-cards {
    gap: 20px;
  }

  .feature-card {
    padding: 28px 24px;
  }

  .card-icon {
    width: 52px;
    height: 52px;
  }

  .card-title {
    font-size: clamp(20px, 2.5vw, 28px);
  }

  .card-desc {
    font-size: clamp(12px, 1.4vw, 16px);
  }

  .card-action {
    font-size: clamp(12px, 1.3vw, 14px);
  }

  .landscape-page__back-btn {
    top: 15px;
    left: 15px;
    padding: 8px 16px;
    font-size: 13px;
  }

  .landscape-page__footer {
    padding: 15px 0;
  }

  .footer-text {
    font-size: clamp(11px, 1.3vw, 14px);
  }
}

/* 超小屏幕横屏 */
@media (orientation: landscape) and (max-height: 500px) {
  .landscape-page__content {
    padding: 15px 20px;
  }

  .landscape-page__header {
    padding: 10px 0;
  }

  .title-main {
    font-size: clamp(32px, 4vw, 48px);
  }

  .main-cards {
    gap: 16px;
  }

  .feature-card {
    padding: 24px 20px;
  }

  .card-content {
    gap: 16px;
  }

  .card-icon {
    width: 48px;
    height: 48px;
  }
}

/* 竖屏时隐藏内容 */
@media (orientation: portrait) {
  .landscape-page__content {
    opacity: 0.3;
  }
}
</style>
